import request from '@/request'

/**
 * 注册用户
 * 
 * @param {*} registerParams 
 * @returns 
 */

export function register(registerParams) {
  return request({
    url: `/sso/user/register`,
    method: 'post',
    data: {
      "id": "xiyanaaaa",
      "name": "夕颜",
      "passwd": "9464653473df"
    },

  })
}

/**
 * 添加用户到用户组
 * @param {*} registerParams 
 * @returns 
 */

export function addUserToUserGroup(registerParams) {
  return request({
    url: `/sso/user/group`,
    method: 'post',
    data: {
      "users": ["xiyan"],
      "group": 9
    }

  })
}

/**
 * 登录
 * @param {} loginParams 
 * @returns 
 */
export function userLogin(loginParams) {
  return request({
    url: `/sso/user/login`,
    method: 'post',
    data: loginParams

  })
}

/**
 * 获取全部用户列表
 * @param {*} page 
 * @param {*} pageSize 
 * @returns 
 */
export function getUserList(page, pageSize) {
  return request({
    url: `/sso/user/list/${page}/${pageSize}/:asc`,
    method: 'get',
  })
}